<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/7/16
 * Time: 11:43
 */
namespace WeChatDeveloper\app;

use WeChat\Template;

class WxMsg
{

    public $template;

    public function __construct($config)
    {
        require __DIR__ . '/../include.php';
        $this->template = new Template($config);
        $this->config = $config;
    }


    /**
     * 发送模板消息
     * @param array $data 发送的消息对象数组
     * @return array
     * @throws \WeChat\Exceptions\InvalidResponseException
     * @throws \WeChat\Exceptions\LocalCacheException
     */
    public function send($data){
        return $this->template->send($data);
    }



}